home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
301-325
/
315
/
drawmap
/
drawmap.doc
< prev
next >
Wrap
Text File
|
1995-03-14
|
5KB
|
109 lines
Drawmap
Version 2.0
A program for drawing representations of the Earth's surface.
by
Bryan Brown
01/30/90
I. Distribution
As with version 1.0 (on Fish disk 229), this program is released into
the public domain (FREEWARE), and is freely distributable as long as this
document file, source code, header files and map files are included in their
entirety. The source may be modified for personal use, but is NOT for
commercial use. The program was developed with Aztec C v. 3.6a. Users of
Lattice C should have little difficulty recreating the executable from
source, however.
Files included:
drawmap.doc - this documentation file
drawmap.c - source code
drawmap.h - header file
drawmap-menu.h - header file for menu selections
drawmap-req.h - header file for string requester
drawmap - executable code
map.bin - map file (same as in version 1.0)
map-trig.bin - map file (same as in version 1.0)
map-tidy.bin - special map file (see below)
map-tidy-trig.bin - special map file (see below)
makedrawmap - simple batch file for building the
executable code
pop.doc - documentation for the pop-up menu
code
pop.c - original source code for the pop-up
menus
pop-drawmap.c - source for pop-up menus, modified for
this application
popmenu.h - header file needed by pop.c and
pop-drawmap.c
makepop-drawmap - batch file for compiling pop-drawmap.c
II. Enhancements to Version 1.0
(1) New functions:
(a) Shadow - This makes a dropshadow of land masses onto the water
areas. The implementation is loosely based on Scott Steinman's
FastPix algorithm from Amazing Computing, vol. 4, no. 11.
(b) Text - The user may now enter text to be written on the maps,
text positioning being via the mouse. User text input is via a
simple string requester, and is limited to a maximum of 30
characters. No provision is made for alternate fonts.
(2) Modifications:
(a) A better-looking mouse pointer is provided, similar to that
on IRIS workstations.
(b) Instructions to the user to wait are now via a modified
mouse pointer instead of via a message in the window title bar.
(c) Event handling has been improved. In version 1.0, pressing
the menu button before a drawing had completed caused the pop-up
menu to appear as soon as the drawing was complete. In this
version, all inappropriate events are disabled until drawing is
complete.
(d) A brute force method of color-filling partially drawn regions
is used. Special arrays of points (files map-tidy.bin and map-
tidy-trig.bin) is scanned, each point having been carefully
chosen to lie within a land mass. If a point in the array is
visible (based on the type of map being displayed), that point is
used in the flood-fill function to color-fill the region in which
it lies. While not elegant, the method at least has the virtue
of working for large regions. It is still possible to miss small
regions, however.
III. Miscellaneous
(1) Speed - No attempt has been made to speed up the drawing process.
Single precision floating point calculations (FFP package) have
sufficient accuracy for these display purposes, since the accuracy is
limited by the accuracy of the map files. In fact, using the IEEE
floating point option of the Aztec C compiler without a 68881 math
coprocessor results in a marked speed penalty. As might be expected,
however, a 68881 does improve performance over that of the FFP
package. Some tests with a 33 MHz 68030 board show impressive
results, such as completing a globe view in 3 to 4 seconds. No tests
have been made with a 68030 and 68882 combination, however.
IV. Correspondence
In addition to my work address (given with version 1.0), I may now be
reached at my new home address also:
Bryan Brown
13129 Collingwood Terrace
Silver Spring, MD 20904
Any questions, suggestions, etc., are always welcome.